From 0f0762e81091841efcd728de0d04f0c118c379d6 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Sun, 2 Dec 2018 23:26:03 +0000 Subject: [PATCH] libbpf: link shared object with libelf libbpf.so needs to be linked against libelf to avoid missing symbols. Signed-off-by: Hilko Bengen Gbp-Pq: Topic bugfix/all Gbp-Pq: Name libbpf-link-shared-object-with-libelf.patch --- tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index d40b6432e93..86fd56c698b 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -170,7 +170,7 @@ $(BPF_IN): force elfdep bpfdep $(Q)$(MAKE) $(build)=libbpf $(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN) - $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,$(@F) -o $@ + $(QUIET_LINK)$(CC) --shared $^ -lelf -Wl,-soname,$(@F) -o $@ $(OUTPUT)libbpf.a: $(BPF_IN) $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ -- 2.30.2